<?php

/**
 * Clientorder filter form base class.
 *
 * @package    briefing
 * @subpackage filter
 * @author     Your name here
 * @version    SVN: $Id: sfDoctrineFormFilterGeneratedTemplate.php 29570 2010-05-21 14:49:47Z Kris.Wallsmith $
 */
abstract class BaseClientorderFormFilter extends BaseFormFilterDoctrine
{
  public function setup()
  {
    $this->setWidgets(array(
      'ordername'             => new sfWidgetFormFilterInput(array('with_empty' => false)),
      'textcategoryid'        => new sfWidgetFormDoctrineChoice(array('model' => $this->getRelatedModelName('Textcategories'), 'add_empty' => true)),
      'is_website'            => new sfWidgetFormChoice(array('choices' => array('' => 'yes or no', 1 => 'yes', 0 => 'no'))),
      'is_print'              => new sfWidgetFormChoice(array('choices' => array('' => 'yes or no', 1 => 'yes', 0 => 'no'))),
      'is_newsletter'         => new sfWidgetFormChoice(array('choices' => array('' => 'yes or no', 1 => 'yes', 0 => 'no'))),
      'is_poster'             => new sfWidgetFormChoice(array('choices' => array('' => 'yes or no', 1 => 'yes', 0 => 'no'))),
      'is_blog'               => new sfWidgetFormChoice(array('choices' => array('' => 'yes or no', 1 => 'yes', 0 => 'no'))),
      'othertextmediumid'     => new sfWidgetFormDoctrineChoice(array('model' => $this->getRelatedModelName('Othertextmedium'), 'add_empty' => true)),
      'targetgroupid'         => new sfWidgetFormDoctrineChoice(array('model' => $this->getRelatedModelName('Targetgroup'), 'add_empty' => true)),
      'is_existing_custormer' => new sfWidgetFormChoice(array('choices' => array('' => 'yes or no', 1 => 'yes', 0 => 'no'))),
      'is_new_customer'       => new sfWidgetFormChoice(array('choices' => array('' => 'yes or no', 1 => 'yes', 0 => 'no'))),
      'is_women'              => new sfWidgetFormChoice(array('choices' => array('' => 'yes or no', 1 => 'yes', 0 => 'no'))),
      'is_men'                => new sfWidgetFormChoice(array('choices' => array('' => 'yes or no', 1 => 'yes', 0 => 'no'))),
      'formalstyleid'         => new sfWidgetFormDoctrineChoice(array('model' => $this->getRelatedModelName('Formalstyle'), 'add_empty' => true)),
      'personstyleid'         => new sfWidgetFormDoctrineChoice(array('model' => $this->getRelatedModelName('Personstyle'), 'add_empty' => true)),
      'emotionstyleid'        => new sfWidgetFormDoctrineChoice(array('model' => $this->getRelatedModelName('Emotionstyle'), 'add_empty' => true)),
      'formulateid'           => new sfWidgetFormDoctrineChoice(array('model' => $this->getRelatedModelName('Formulatetext'), 'add_empty' => true)),
      'freetextid'            => new sfWidgetFormDoctrineChoice(array('model' => $this->getRelatedModelName('Freetext'), 'add_empty' => true)),
      'urlimagestructure'     => new sfWidgetFormFilterInput(),
      'is_standard'           => new sfWidgetFormChoice(array('choices' => array('' => 'yes or no', 1 => 'yes', 0 => 'no'))),
      'editionoptionsid'      => new sfWidgetFormDoctrineChoice(array('model' => $this->getRelatedModelName('Editionoptions'), 'add_empty' => true)),
      'created_at'            => new sfWidgetFormFilterDate(array('from_date' => new sfWidgetFormDate(), 'to_date' => new sfWidgetFormDate())),
      'expires_at'            => new sfWidgetFormFilterDate(array('from_date' => new sfWidgetFormDate(), 'to_date' => new sfWidgetFormDate())),
      'updated_at'            => new sfWidgetFormFilterDate(array('from_date' => new sfWidgetFormDate(), 'to_date' => new sfWidgetFormDate())),
    ));

    $this->setValidators(array(
      'ordername'             => new sfValidatorPass(array('required' => false)),
      'textcategoryid'        => new sfValidatorDoctrineChoice(array('required' => false, 'model' => $this->getRelatedModelName('Textcategories'), 'column' => 'idtextcategories')),
      'is_website'            => new sfValidatorChoice(array('required' => false, 'choices' => array('', 1, 0))),
      'is_print'              => new sfValidatorChoice(array('required' => false, 'choices' => array('', 1, 0))),
      'is_newsletter'         => new sfValidatorChoice(array('required' => false, 'choices' => array('', 1, 0))),
      'is_poster'             => new sfValidatorChoice(array('required' => false, 'choices' => array('', 1, 0))),
      'is_blog'               => new sfValidatorChoice(array('required' => false, 'choices' => array('', 1, 0))),
      'othertextmediumid'     => new sfValidatorDoctrineChoice(array('required' => false, 'model' => $this->getRelatedModelName('Othertextmedium'), 'column' => 'idothertextmedium')),
      'targetgroupid'         => new sfValidatorDoctrineChoice(array('required' => false, 'model' => $this->getRelatedModelName('Targetgroup'), 'column' => 'idtargetgroup')),
      'is_existing_custormer' => new sfValidatorChoice(array('required' => false, 'choices' => array('', 1, 0))),
      'is_new_customer'       => new sfValidatorChoice(array('required' => false, 'choices' => array('', 1, 0))),
      'is_women'              => new sfValidatorChoice(array('required' => false, 'choices' => array('', 1, 0))),
      'is_men'                => new sfValidatorChoice(array('required' => false, 'choices' => array('', 1, 0))),
      'formalstyleid'         => new sfValidatorDoctrineChoice(array('required' => false, 'model' => $this->getRelatedModelName('Formalstyle'), 'column' => 'idformalstyle')),
      'personstyleid'         => new sfValidatorDoctrineChoice(array('required' => false, 'model' => $this->getRelatedModelName('Personstyle'), 'column' => 'idpersonstyle')),
      'emotionstyleid'        => new sfValidatorDoctrineChoice(array('required' => false, 'model' => $this->getRelatedModelName('Emotionstyle'), 'column' => 'idemotionstyle')),
      'formulateid'           => new sfValidatorDoctrineChoice(array('required' => false, 'model' => $this->getRelatedModelName('Formulatetext'), 'column' => 'idformulatetext')),
      'freetextid'            => new sfValidatorDoctrineChoice(array('required' => false, 'model' => $this->getRelatedModelName('Freetext'), 'column' => 'idfreetext')),
      'urlimagestructure'     => new sfValidatorPass(array('required' => false)),
      'is_standard'           => new sfValidatorChoice(array('required' => false, 'choices' => array('', 1, 0))),
      'editionoptionsid'      => new sfValidatorDoctrineChoice(array('required' => false, 'model' => $this->getRelatedModelName('Editionoptions'), 'column' => 'ideditionoptions')),
      'created_at'            => new sfValidatorDateRange(array('required' => false, 'from_date' => new sfValidatorDateTime(array('required' => false, 'datetime_output' => 'Y-m-d 00:00:00')), 'to_date' => new sfValidatorDateTime(array('required' => false, 'datetime_output' => 'Y-m-d 23:59:59')))),
      'expires_at'            => new sfValidatorDateRange(array('required' => false, 'from_date' => new sfValidatorDateTime(array('required' => false, 'datetime_output' => 'Y-m-d 00:00:00')), 'to_date' => new sfValidatorDateTime(array('required' => false, 'datetime_output' => 'Y-m-d 23:59:59')))),
      'updated_at'            => new sfValidatorDateRange(array('required' => false, 'from_date' => new sfValidatorDateTime(array('required' => false, 'datetime_output' => 'Y-m-d 00:00:00')), 'to_date' => new sfValidatorDateTime(array('required' => false, 'datetime_output' => 'Y-m-d 23:59:59')))),
    ));

    $this->widgetSchema->setNameFormat('clientorder_filters[%s]');

    $this->errorSchema = new sfValidatorErrorSchema($this->validatorSchema);

    $this->setupInheritance();

    parent::setup();
  }

  public function getModelName()
  {
    return 'Clientorder';
  }

  public function getFields()
  {
    return array(
      'idorder'               => 'Number',
      'ordername'             => 'Text',
      'textcategoryid'        => 'ForeignKey',
      'is_website'            => 'Boolean',
      'is_print'              => 'Boolean',
      'is_newsletter'         => 'Boolean',
      'is_poster'             => 'Boolean',
      'is_blog'               => 'Boolean',
      'othertextmediumid'     => 'ForeignKey',
      'targetgroupid'         => 'ForeignKey',
      'is_existing_custormer' => 'Boolean',
      'is_new_customer'       => 'Boolean',
      'is_women'              => 'Boolean',
      'is_men'                => 'Boolean',
      'formalstyleid'         => 'ForeignKey',
      'personstyleid'         => 'ForeignKey',
      'emotionstyleid'        => 'ForeignKey',
      'formulateid'           => 'ForeignKey',
      'freetextid'            => 'ForeignKey',
      'urlimagestructure'     => 'Text',
      'is_standard'           => 'Boolean',
      'editionoptionsid'      => 'ForeignKey',
      'created_at'            => 'Date',
      'expires_at'            => 'Date',
      'updated_at'            => 'Date',
    );
  }
}
